﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ZXCompany.Models.Entity.ZX_CompanyPoint>" %>
<%@ Import Namespace="ZXCompany.DBUtil" %>
<%@ Import Namespace="ZXCompany.Models.Entity" %>
<%@ Import Namespace="System.Collections.Generic" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>公司观点</h2>    
    <%   
        string HomeAction = Request.QueryString["action"] == null ? "" : Request.QueryString["action"].ToString();
        if (HomeAction != "add")
        { 
    %>
    <div style="width:100%;" class="tabtitle" >
	    <ul id="mytab1">
		    <li class="active">公司观点管理</li>
		    <li class="normal" onclick="javascript:window.location.href = 'CompanyPoint.aspx?action=add&zid=0';">公司观点添加</li>
	    </ul>
    </div>
    <div style="width:100%;">
	    <table style="text-align:center;">
            <tr class="tdodd">
                <th style="background: none repeat scroll 0% 0% rgb(102, 187, 255);" colspan="7"></th>
            </tr>
            <tr style=" height:20px;background: #eeeeff;"><td colspan="7"></td></tr>
            <tr style="background:#8899cc; font-size:14px;">
                <td style="background: #eeeeff; width:5%"></td>
                <td style="width:5%; font-weight:bold; ">序号</td>
                <td style="width:5%; font-weight:bold; ">标题</td>
                <td style="width:40%;font-weight:bold;">文章详细</td>
                <td style="width:15%;font-weight:bold;">文章日期</td>
                <td style="width:10%;"></td>
                <td style="background: #eeeeff; width:5%"></td>
            </tr>
            <%     
                IList<ZX_CompanyPoint> HPImageList = ViewData["Account_ExpertType"] as IList<ZX_CompanyPoint>;
                for (int i = 0; i < HPImageList.Count; i++)
                {
            %>
            <tr style="background: #fff;"> 
                <td style="background: #eeeeff; width:5%"></td>
  	            <td ><% =i +1 %></td>
                <td ><%=HPImageList[i].title %></td>
                <td style=" text-align:left;"><% =HPImageList[i].detail %></td>
                <td ><% =HPImageList[i].articleDate %></td>
                <td style="color:#00f">
                    <a href="CompanyPoint.aspx?action=add&hp_id=<%=HPImageList[i].ID %>">编辑</a> |
                    <a href="CompanyPoint.aspx?action=del&hp_id=<%=HPImageList[i].ID %>" onclick="if(!confirm('确定删除该公司观点么？'))return false;">
                    删除</a> 
                </td>
                <td style="background: #eeeeff; width:5%"></td>
            </tr>
            <%   
                }      
            %>
        </table>
    </div>
    <%
    }
    else
    { 
    %>
    <form action="<%=VirtualPath.getVirtualPath()%>/Account/CompanyPoint_Edit.aspx" method="post" id="Form1" name="CompanyPoint_Edit">  
    <div style="width:100%;" class="tabtitle" >
	    <ul id="Ul1">
		    <li class="normal" onclick="javascript:window.location.href = 'CompanyPoint.aspx';">公司观点管理</li>
		    <li class="active">公司观点添加</li>
	    </ul>
    </div>
    <div style="width:100%;">
	    <table class="ta" >
            <tr class="tdodd">
                <th style="background: none repeat scroll 0% 0% rgb(102, 187, 255);" colspan="4"></th>
            </tr>
            <tr><td style="background: #eeeeff; height:20px;" colspan="4"></td></tr>
	        <tr>
                <td style="background: #eeeeff; width:10%"></td>
                <td style=" text-align:center; width:120px; height:40px;">标题：</td>
                <td align="left"> 
                    <input class="input_out" style="padding: 2px; width: 450px;" 
                        value="<% =Model.title %>" name="title" id="etype" size="40" type="text"/>               
	            </td>
                <td style="background: #eeeeff; width:10%"></td>
            </tr>
	        <tr>
                <td style="background: #eeeeff; width:10%"></td>
                <td style=" text-align:center; width:120px; height:40px;">文章日期：</td>
                <td align="left"> 
                    <input class="input_out" style="padding: 2px; width: 450px;" 
                        value="<% =Model.articleDate %>" name="articleDate" id="Text1" size="40" type="text"/>               
	            </td>
                <td style="background: #eeeeff; width:10%"></td>
            </tr>
	        <tr>
                <td style="background: #eeeeff; width:10%"></td>
                <td style=" text-align:center; height:40px;">文章详细：</td>
                <td align="left"> 
                    <textarea class="ckeditor" cols="80" id="detail" name="detail" rows="10">
                        <% =Model.detail%>
                    </textarea>
                    <%--<input class="input_out" style="padding: 2px; width: 450px;" 
                    value="<% =Model.detail %>" name="detail" size="40" type="text"/>--%>

	            </td>
                <td style="background: #eeeeff; width:10%"></td>
            </tr>
            <tr>
                <td style="background: #eeeeff; width:10%"></td>
                <td></td>
                <td style=" text-align:center; height:40px;">
                    <input type="submit" id="infoSave" value="保存" class="input2"/>
                    <input type="hidden" value="<% =Model.ID %>" name="ID" id="ID"/>
                </td>
                <td style="background: #eeeeff; width:10%"></td>
            </tr>
            <tr><td style="background: #eeeeff; height:20px;" colspan="4"></td></tr>
        </table>
    </div>
    </form>    
    <%
    }
    %>
</asp:Content>

<%--<h2>公司观点</h2>
    <div style="margin:0 auto; width:100% ;text-align:center;"> 
        <table width ="90%" style=" height:100%;">
            <tr style="background:#6677AA;">
                <td style="width:10%; font-weight:bold; font-size:14px;">标题</td>
                <td style="width:80%;font-weight:bold; font-size:14px;"">文章详细</td>
                <td style="width:10%;font-weight:bold; font-size:14px;"">文章日期</td>
                <td></td>
            </tr>
            <tr>
                <td>咨询专家</td>
                <td>再到消除生产、品质及管理Loss的Lossless活动负责人，再到基于组织绩效管理的MBS负责人，以及6sigma运营推广和1P1P、TDR课题负责人，广泛而又深入地把握了现代企业管理的方法和原则，积累了丰富而又实际的操作经验。</td>
                <td>2011-08-27</td>
                <td style="text-align:left"><input type="button" id="Button1" value="编辑" /><input type="button" id="Button2" value="删除" />
                </td>
            </tr>
            <tr>
                <td>咨询专家</td>
                <td>在世界知名企业长期从事经营变革的推动工作，对企业管理方式的转变，经营方式的变革具有丰富的经验。</td>
                <td>2011-08-27</td>
                <td style="text-align:left"><input type="button" id="Button3" value="编辑" /><input type="button" id="Button4" value="删除" />
                </td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td></td>
                <td style="text-align:left">
                    <input type="button" id="infoSave" value="添加" class="input2" />
                </td>
            </tr>
        </table>
    </div>--%>